/*
 *  Copyright (C) 2011 Hatsites
 *
 *  This program is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU General Public License
 *  as published by the Free Software Foundation; either version 2
 *  of the License, or (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */

package org.myorg.ctm.etk.gui.swg.display.create.item.panel;

import javax.swing.GroupLayout;
import org.myorg.ctm.etk.gui.swg.display.create.PnlIdtAbs;

/**
 *
 * @author Hatsites
 *
 * email: Hatsites_AT_gmail.com
 * ... please remove "_AT_" from the above string to get the right email address
 */

public class PnlIdtAnm extends PnlIdtAbs{
    public PnlIdtAnm(){
        this._pnlName_ = new PnlIdtAnmName();
        this._pnlDate_ = new PnlIdtAnmSexDat();

    }

    @Override
    public boolean init() {
        if(!this._pnlDate_.init()){
            return false;
        }
        if(!this._pnlName_.init()){
            return false;
        }

        javax.swing.GroupLayout layout = new GroupLayout(this);
        this.setLayout(layout);

        layout.setHorizontalGroup(
            layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                    .addComponent(this._pnlName_)
                    .addComponent(this._pnlDate_))
             )
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(this._pnlName_)
                .addGap(20,20,20)
                .addComponent(this._pnlDate_)
            )
        );
        return true;
    }

    public void destroy() {
        return;
    }

    public String getIdentiteNom() {
        return this._pnlName_.getNameNom();
    }
    public String getIdentiteDateNaissance() {
        return this._pnlDate_.getDateNaissance();
    }
    public String getIdentiteDateMort() {
        return this._pnlDate_.getDateMort();
    }
    public String getIdentiteSexe() {
        return this._pnlDate_.getSexe();
    }
    public String getIdProprietaire(){
        return this._pnlName_.getIdProprietaire();
    }
    public String getCastre(){
        return "p";
    }
    public String getEspece(){
        return this._pnlName_.getEspece();
    }
    public String getRace(){
        return this._pnlName_.getRace();
    }

    private PnlIdtAnmName _pnlName_;
    private PnlIdtAnmSexDat _pnlDate_;



}
